package com.ruoyi.smile.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.smile.mapper.McTransmitMapper;
import com.ruoyi.smile.domain.McTransmit;
import com.ruoyi.smile.service.IMcTransmitService;

/**
 * 转发Service业务层处理
 * 
 * @author xin
 * @date 2025-03-18
 */
@Service
public class McTransmitServiceImpl implements IMcTransmitService 
{
    @Autowired
    private McTransmitMapper mcTransmitMapper;

    /**
     * 查询转发
     * 
     * @param id 转发主键
     * @return 转发
     */
    @Override
    public McTransmit selectMcTransmitById(Long id)
    {
        return mcTransmitMapper.selectMcTransmitById(id);
    }

    /**
     * 查询转发列表
     * 
     * @param mcTransmit 转发
     * @return 转发
     */
    @Override
    public List<McTransmit> selectMcTransmitList(McTransmit mcTransmit)
    {
        return mcTransmitMapper.selectMcTransmitList(mcTransmit);
    }

    /**
     * 新增转发
     * 
     * @param mcTransmit 转发
     * @return 结果
     */
    @Override
    public int insertMcTransmit(McTransmit mcTransmit)
    {
        mcTransmit.setCreateTime(DateUtils.getNowDate());
        return mcTransmitMapper.insertMcTransmit(mcTransmit);
    }

    /**
     * 修改转发
     * 
     * @param mcTransmit 转发
     * @return 结果
     */
    @Override
    public int updateMcTransmit(McTransmit mcTransmit)
    {
        mcTransmit.setUpdateTime(DateUtils.getNowDate());
        return mcTransmitMapper.updateMcTransmit(mcTransmit);
    }

    /**
     * 批量删除转发
     * 
     * @param ids 需要删除的转发主键
     * @return 结果
     */
    @Override
    public int deleteMcTransmitByIds(Long[] ids)
    {
        return mcTransmitMapper.deleteMcTransmitByIds(ids);
    }

    /**
     * 删除转发信息
     * 
     * @param id 转发主键
     * @return 结果
     */
    @Override
    public int deleteMcTransmitById(Long id)
    {
        return mcTransmitMapper.deleteMcTransmitById(id);
    }
}
